<template>
	<!-- 信息编辑 -->
	<view class="building-add">
		<view class="add-head">
			<view class="head-left">
				<view class="head-left-1">上传图片</view>
				<view class="head-left-2">图片建议大小不超过2M</view>
			</view>
			<view class="head-right">
				<image v-if="avator==''" src="../../../static/touxiang-2.png"></image>
				<image v-else :src="avator"></image>
			</view>
		</view>
		<view class="add-content">
			<view class="add-item">
				<view class="item-left">名称<text>*</text></view>
				<view class="item-right"><input v-if="gridStaff.userName!=='' && gridStaff.userName!=undefined" placeholder="请填写姓名" v-model="gridStaff.userName"></view>
			</view>
			<view class="add-item">
				<view class="item-left" >性别<text>*</text></view>
				<view class="item-right"><input v-if="gridStaff.userSex!=='' && gridStaff.userSex!=undefined" v-model="gridStaff.userSex" placeholder="请填写性别"></view>
			</view>
			<view class="add-item">
				<view class="item-left">所属部门<text>*</text></view>
				<view class="item-right"><input v-if="gridStaff.sysOrgCode!=='' && gridStaff.sysOrgCode!=undefined" v-model="gridStaff.sysOrgCode" placeholder="请填写所属部门"></view>
			</view>
			<view class="add-item">
				<view class="item-left">级别<text>*</text></view>
				<view class="item-right"><input v-if="gridStaff.userType !=='' &&gridStaff.userType!=undefined" v-model="gridStaff.userType" placeholder="请填写级别"></view>
			</view>
			<view class="add-item">
				<view class="item-left">联系方式<text>*</text></view>
				<view class="item-right"><input v-if="gridStaff.userPhone!=='' && gridStaff.userPhone!=undefined" v-model="gridStaff.userPhone" placeholder="请填写联系方式"></view>
			</view>
		</view>
		<!-- <view class="btn">保存</view> -->
	</view>
</template>

<script>
	export default{
		data() {
			return{
				avator:'',
				userLevel:'',
				gridStaff:{}
			}
		},
		onLoad(options) {
			let gridStaff = JSON.parse(options.gridStaff)
			this.avator = gridStaff.userImage
			this.gridStaff = gridStaff
		},
		methods:{
		}
	}
</script>

<style lang="scss" scoped>
	.building-add{
		background-color: #f5f6f7;
		min-height: 100vh;
		.add-head{
			display: flex;
			justify-content: space-between;
			align-items: center;
			background-color: #fff;
			height: 180rpx;
			padding: 20rpx;
			.head-left{
				.head-left-1{
					color: #000;
					font-size: 28rpx;
					font-weight: 600;
				}
				.head-left-2{
					color: #999;
					font-size: 24rpx;
					margin-top: 20rpx;
				}
			}
			.head-right{
				background-color: #f4f1f1;
				display: flex;
				justify-content: center;
				align-items: center;
				border-radius: 10rpx;
				width: 150rpx;
				height: 150rpx;
				image{
					width: 80%;
					height: 80%;
				}
			}
		}
		.add-content{
			margin-top: 20rpx;
			padding-bottom: 110rpx;
			.add-item{
				display: flex;
				justify-content: space-between;
				align-items: center;
				padding: 20rpx;
				background-color: #fff;
				border-bottom: 1px solid #f4f1f1;
				.item-left{
					color: #333;
					font-size: 28rpx;
					min-width: 100rpx;
					text{
						color: #DD524D;
					}
				}
				.item-right{
					font-size: 26rpx;
					color: #999;
					input{
						text-align: right;
					}
					textarea{
						
					}
				}
			}
		}
		.btn{
				background-color: #007AFF;
				display: flex;
				justify-content: center;
				align-items: center;
				width: 600rpx;
				height: 80rpx;
				border-radius: 40rpx;
				color: #fff;
				margin: 0 auto;
		}
	}
</style>
